From: Florian Müllner Date: Thu, 3 Sep 2026 17:51:52 +0000 (+0200) Subject: inputMethod: Pass tracked object to connectObject() calls X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~26 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=548ede493a375fc7dfd461c7b8f96773990e3195;p=gnome-shell.git inputMethod: Pass tracked object to connectObject() calls Otherwise the handler will be associated with the `globalThis` object and never get disconnected automatically. Part-of: (cherry picked from commit 1579879c666448c090d2009c98cb3840c7811652) --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 4d123c31f..806a9f380 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -93,7 +93,9 @@ export const InputMethod = GObject.registerClass({ if (HAVE_REQUIRE_SURROUNDING_TEXT) this._context.connect('require-surrounding-text', this._onRequireSurroundingText.bind(this)); - Main.keyboard.connectObject('visibility-changed', () => this._updateCapabilities()); + Main.keyboard.connectObject( + 'visibility-changed', () => this._updateCapabilities(), + this); this._updateCapabilities(); }